#ifndef SCRIPT_MANAGER_H_
#define SCRIPT_MANAGER_H_

#include <lua.hpp>
#include <map>
#include <string>

class CScript;

class CScriptManager
{

	lua_State* L;
	std::map< std::string, CScript* > m_mScripts;

	CScriptManager(void);
	~CScriptManager(void);
	CScriptManager( const CScriptManager& );
	CScriptManager& operator=( const CScriptManager& );


public:

	static CScriptManager* GetInstance( void );
	void InitializeLua( void );
	void ShutdownLua( void );
	void LoadLuaScript( const char* szFilename );
	void Store( CScript* pScript, std::string pTag );


	// Accessors
	lua_State* GetLuaState( void ) const { return L; }
	CScript* GetScript( const std::string pTag ) { return m_mScripts[pTag]; }


};


#endif